package com.fitns.user.conf;

public class Constants  {
	public static final String DATESTR = "yyyy-MM-dd HH:mm:ss";// 时间格式

	public static final String IMAGE_PATH="/data/wwwroot/mounted/img/";

	public  static enum STATUS  {
		OK(0, "正常"), //
		DELETE(1,"逻辑删除"), //
		;
		public  int type;
		public  String name;
		STATUS(int type,String name) {
			this.type = type;
			this.name = name;
		}
		public static String get(int v) {
			for (STATUS rft : STATUS.values()) {
				if (rft.type == v)
					return rft.name;
			}
			return null;
		}
		public static STATUS getByType(int v) {
			for (STATUS rft : STATUS.values()) {
				if (rft.type == v)
					return rft;
			}
			return null;
		}
	}
	//禁止，可用
	public  static enum ENABLED  {
		OK(0, "正常"), //
		DISABLED(1,"禁止"), //
		;
		public  int type;
		public  String name;
		ENABLED(int type,String name) {
			this.type = type;
			this.name = name;
		}
		public static String get(int v) {
			for (ENABLED rft : ENABLED.values()) {
				if (rft.type == v)
					return rft.name;
			}
			return null;
		}
		public static ENABLED getByType(int v) {
			for (ENABLED rft : ENABLED.values()) {
				if (rft.type == v)
					return rft;
			}
			return null;
		}
	}
	
}